<script type="text/javascript" src="/media/js/jquery.validate.min.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
      
        $("#area_form").validate({
            rules: {
                do_all: "required"
                
            },
            messages: {
                do_all: "请选择要进行的操作!"
                
                
			
            }
        });
      
    });
</script>


<div id="box1" class="box box-100"><!-- box full-width -->
    <div class="boxin">
        <div class="header">
            <h3>分类模块管理</h3>
              <?php if(isset($id_top)) {?>
             <a class="button" href="/admin/category/list/0">第一页&nbsp;»</a>
             <a class="button" href="/admin/category/list/<?php echo $id_top?>">返回上一级&nbsp;»</a>
            <?php }?>
            <a class="button" href="/admin/category/add/<?php echo $id?>">添加分类&nbsp;»</a>
          
        </div>
        <div id="box1-tabular" class="content"><!-- content box 1 for tab switching -->
            <fieldset>
                <form action="/admin/category/do_all" method="POST" id="area_form" name="area_form" onsubmit="return checkform();" style="padding:0">
                <table cellspacing="0">
                    <thead><!-- universal table heading -->
                        <tr>
                            <td class="tc" width="5%"></td>
                            <td class="tc">分类名称</td>
                     
                            <td class="tc">排序</td>
                            <td class="tc">操作</td>
                        </tr>
                    </thead>
                    <tbody>



                        <?php if (is_array($result)): ?>
                            <?php foreach ($result as $key => $value): ?>
                                <tr class="first"><!-- .first for first row of the table (only if there is thead) -->
                                    <td class="tc"><input type="checkbox" id="data-1-check-1" name="id_category[]" value="<?php echo $value['id_category'] ?>" /></td>
                                     <td class="tc" ><?php echo $value['name'] ?></td>
                                    <td class="tc" ><input type="text" value="<?php echo $value['position'] ?>" name="position[<?php echo $value['id_category'] ?>][]" size="5"></td>
                                    <td class="tc" ><!-- action icons - feel free to add/modify your own - icons are located in "css/img/led-ico/*" -->
                                        <ul class="actions">
                                            <li><a class="ico" href="/admin/category/list/<?php echo $value['id_category'] ?>" title="下一级">下一级</a></li>
                                            <li><a class="ico" href="/admin/category/edit/<?php echo $value['id_category'] ?>" title="修改"><img src="/media/images/led-ico/pencil.png" alt="修改" /></a></li>
                                            <li><a class="ico" href="/admin/category/delete/<?php echo $value['id_category'] ?>" title="删除" onClick="return ConfirmDel();"><img src="/media/images/led-ico/delete.png" alt="删除" /></a></li>
                                        </ul>
                                    </td>
                                </tr>
                            <?php endforeach ?>
                        <?php endif ?>
    <tr ><!-- .first for first row of the table (only if there is thead) -->
        <td class="tc"><input type="checkbox" id="check_all"  value="true" onclick="sel('id_category[]',this);" /></td>
        <td><label for="check_all"> <span class="button">全选</span></label></td>                      
        <td colspan="6"> <label for="do_delete"><input type="radio" name="do_all"  value="do_delete" id="do_delete" onClick="return ConfirmDel();"/>删除</label>
            <label for="do_edit">
                
                <input type="radio" name="do_all" value="do_edit" id="do_edit"/>排序</label> <input class="button altbutton" type="submit" value="确定" /></td>
                                </tr>


                    </tbody>
                </table>
                    </form>
            </fieldset>
            <div class="pagination"><!-- pagination underneath the box's content -->


            </div>
        </div><!-- .content#box-1-holder -->
        <!-- code bellow is only example for switching between tabs, not regular content -->
    </div>
</div>       <script type="text/javascript" src="/media/js/checkform.js"></script>